<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/taglib/jstl/c.tld" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
	<HEAD>
		<TITLE>用户登录</TITLE>
		<LINK href="images/Default.css" type=text/css rel=stylesheet>
		<LINK href="images/xtree.css" type=text/css rel=stylesheet>
		<LINK href="images/User_Login.css" type=text/css rel=stylesheet>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
		<style type="text/css">
		<!--
			.errorfield, .errorfield a{ 	
				text-align:left;
				font-size: 9pt;	
				font-weight: bold;
				line-height: 24px;
				color: #F85D00;	
				
			}
			.errorfield{
			  border:1px solid #FF9966;
				margin-top:500;
				MARGIN-RIGHT:45; 
				MARGIN-LEFT:4;
				width:480px;
				background:url(images/error.gif) no-repeat top left #FFFCE5;	
				text-indent: 16pt;	  
				display:''; 
				cursor:hand;
			}
		-->
		</style>
		<script type="text/javascript" src="${base}/js/jquery/jquery-1.3.min.js"></script>
		<script type="text/javascript">
		function login(){
			var userName=document.getElementById("userName").value;
			var pwd = document.getElementById("pwd").value;
			if(userName == null || userName == ""){
				alert("用户名不能为空!");
				document.getElementById("userName").focus();
				return false;
			}
			if(pwd == null || pwd == ""){
				alert("密码不能为空!");
				document.getElementById("pwd").focus();
				return false;
			}
			var param = {};
			param.userName = userName;
			param.pwd = pwd;
			//
			jQuery.post("${base}/login/auth",param,function(data,textStatus,jqXHR){	
				if(data != null && data.success){
					window.location.href = "${base}/login/homePage";
				}else{
					alert("用户名或密码错误!");
				}
			},'json');
		}
	</script>
	</HEAD>
	<BODY id=userlogin_body>
		<DIV></DIV>

		<DIV id=user_login>
			<DL>
				<DD id=user_top>
					<UL>
						<LI class=user_top_l></LI>
						<LI class=user_top_c></LI>
						<LI class=user_top_r></LI>
					</UL>
				<DD id=user_main>
					<UL>
						<LI class=user_main_l></LI>
						<LI class=user_main_c>
							<DIV class=user_main_box>
								<UL>
									<LI class=user_main_text>
										用户名：
									</LI>
									<LI class=user_main_input>
										<INPUT class=TxtUserNameCssClass id="userName" maxLength=10
											name="userName">
									</LI>
								</UL>
								<UL>
									<LI class=user_main_text>
										密&nbsp;&nbsp;&nbsp;&nbsp;码：
									</LI>
									<LI class=user_main_input>
										<INPUT class=TxtPasswordCssClass id="pwd" type=password
											name="pwd" maxlength=10>
									</LI>
								</UL>
								<UL>
									<LI class=user_main_text>
										Cookie：
									</LI>
									<LI class=user_main_input>
										<SELECT id=DropExpiration name=DropExpiration>
											<OPTION value=None selected>
												不保存
											</OPTION>
											<OPTION value=Day>
												保存一天
											</OPTION>
											<OPTION value=Month>
												保存一月
											</OPTION>
											<OPTION value=Year>
												保存一年
											</OPTION>
										</SELECT>
									</LI>
								</UL>
							</DIV>
						</LI>
						<LI class=user_main_r>
							<INPUT class=IbtnEnterCssClass id=IbtnEnter
								style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"
								onclick='javascript:login()'
								type=image src="images/user_botton.gif" name=IbtnEnter>
						</LI>
					</UL>
				<DD id=user_bottom>
					<UL>
						<LI class=user_bottom_l></LI>
						<LI class=user_bottom_c>	
						</LI>
						<LI class=user_bottom_r></LI>
					</UL>
				</DD>
			</DL>
		</DIV>
		<SPAN id=ValrUserName style="DISPLAY: none; COLOR: red"></SPAN>
		<SPAN id=ValrPassword style="DISPLAY: none; COLOR: red"></SPAN>
		<SPAN id=ValrValidateCode style="DISPLAY: none; COLOR: red"></SPAN>
		<DIV id=ValidationSummary1 style="DISPLAY: none; COLOR: red"></DIV>

		<DIV></DIV>

		</FORM>
	</BODY>
</HTML>
